<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../../bootstrap/css/style.css" rel="stylesheet">

<!-- Bootstrap core CSS -->
<link
	href="<%=basePath%>bootstrap/css/bootstrap.min.css"
	rel="stylesheet">


<script src="../../bootstrap/assets/js/ie-emulation-modes-warning.js"></script>
<script src="<%=basePath%>bootstrap/js/jquery.min.js"></script>
<script src="<%=basePath%>bootstrap/js/bootstrap.min.js"></script>
<script src="<%=basePath%>bootstrap/js/scripts.js"></script>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">


<title>用户信息添加</title>

</head>
<body>
	<!--  -->
	<form action="<%=basePath%>UserInfoQuery" method="post">

		<div class="container-fluid">
			<div class="row rowHeigth">

				<input type="hidden" id="txtUserId" name="opt" value="2">

				<div class="form-group">
					<label class="col-sm-2 control-label">用户名</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" id="txtUserName"
							name="txtUserName" placeholder="用户名">
					</div>

					<label class="col-sm-2 control-label">性别</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" id="selectSext"
							name="selectSext" placeholder="性别">
					</div>
				</div>

			</div>


			<div class="row rowHeigth">

				<div class="form-group">
					<label class="col-sm-2 control-label" for="txtUserAge">年龄</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="txtUserAge"
							name="txtUserAge" placeholder="开始年龄">
					</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" id="txtUserAge"
							name="txtUserAge2" placeholder="结束年龄">
					</div>


					<label class="col-sm-2 control-label" for="txtUserTel">联系方式</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" id="txtUserTel"
							name="txtUserTel" placeholder="联系方式">
					</div>
				</div>
			</div>
			<div class="row rowHeigth">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="txtUserAddress">地址</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" id="txtUserAddress"
							name="txtUserAddress" placeholder="地址">
					</div>
				</div>
			</div>
			<div class="row rowHeigth">
				<div class="form-group">
			
					<div class="col-sm-offset-4 col-sm-1">
						<a class="btn btn-default"
							href="logined/UserInfoManager/userInfoAdd.jsp">添加</a>
					</div>
					<div class="col-sm-offset-1 col-sm-1">
						<button type="submit" class="btn btn-default">查询</button>
					</div>
					<div class="col-sm-offset-1 col-sm-4">
						<button type="reset" class="btn btn-default">重置</button>
					</div>
				</div>

			</div>

		</div>

	</form>
	<form>
		<div>
			<div class="bs-example">
				<table class="table table-hover" >
					<thead>
						<tr>
							<th>#</th>
							<th>学号</th>
							<th>姓名</th>
							<th>性别</th>
							<th>年龄</th>
							<th>联系方式</th>
							<th>地址</th>
							<!-- 操作栏占两格  ？-->
							<th style="text-align: center" colspan="2">操作</th>

						</tr>
					</thead>
					<tbody>
						<c:forEach items="${sessionScope.lstUsers }" var="eachUser"
							varStatus="st">
							<tr>
								<td>${st.index+1 }</td>
								<td>${eachUser.usernum }</td>
								<td>${eachUser.username }</td>
								<td>${eachUser.usersex }</td>
								<td>${eachUser.userage }</td>
								<td>${eachUser.usertel }</td>
								<td>${eachUser.useraddress }</td>
								<td style="text-align: right;"><a href="UserInfoRevise?uid=${eachUser.usernum }">修改</a></td>
								<td><a href="UserInfoDelete?uid=${eachUser.usernum }"
									onclick="return confirm('您确认删除用户名[${eachUser.username }]的记录么?');">删除</a></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</form>


</body>
</html>